package com.leizi.igym.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 健身房用户表
 * @TableName t_user
 */
@TableName(value ="t_user")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    /**
     * 用户id
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户密码

     */
    @TableField(value = "user_password")
    private String userPassword;

    /**
     * 用户电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 用户账户
     */
    @TableField(value = "username")
    private String username;

    /**
     * 用户昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 第三方登录返回openid
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDate createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private LocalDate updateTime;

    /**
     * 逻辑删除，0-未删除，1-已删除
     */
    @TableField(value = "deleted")
    private Integer deleted;

    /**
     * 用户头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 用户简介
     */
    @TableField(value = "intro")
    private String intro;

    /**
     * 角色id
     */
    @TableField(value = "role_id")
    private Long roleId;

    /**
     * 用户性别，0-女，1-男
     */
    @TableField(value = "gender")
    private Integer gender;

    /**
     * 用户状态，0-正常，1-异常
     */
    @TableField(value = "status")
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}